package day14;
import java.io.*;

/**
 * Created by kunsb on 2016/10/19.
 */
public class Stream {
    public static void main(String[] args) throws IOException {
        //流（Stream）IO(input output)
//        BufferedReader br = new BufferedReader(new FileReader("C:/Users/kunsb/Desktop/xxxx/小电影.txt"));
//        String read;
//        while ((read = br.readLine()) != null) {
//            System.out.println( read);
//        }
//        br.close();
//
//        PrintWriter printWriter = new PrintWriter("C:/Users/kunsb/Desktop/xxxx/小电影.txt");
//        printWriter.println("你妹妹的");
//        printWriter.close();

        File scoreFile = new File("D:\\王坤的文档\\电影\\shoot\\score.txt");
        if (!scoreFile.exists()) {
            scoreFile.createNewFile();
        }

        BufferedReader br2 = new BufferedReader(new FileReader(scoreFile));
        String score = br2.readLine();
        int s = 0;
        if (score != null) {
            s = Integer.valueOf(score);
        }
        System.out.println(s);
    }
}
